package org.jeecg.common.exception;

import lombok.Getter;

/**
 * @author ZhangKeChen
 * @date 2022/8/11
 */
@Getter
public class SxkfException extends RuntimeException {

    private final Integer code;
    private final String msg;

    public SxkfException(String msg) {
        this.msg = msg;
        this.code = 500;
    }

    public SxkfException(Integer code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    public SxkfException(SxkfExceptionEnum sxkfExceptionenum) {
        this(sxkfExceptionenum.getCode(), sxkfExceptionenum.getMsg());
    }

}
